import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '项目ID',
    align:"center",
    dataIndex: 'projectId'
   },
   {
    title: '项目名称',
     align:"left",
    dataIndex: 'projectName',
     width: 400
   },
  {
    title: '项目序号',
    align:"left",
    dataIndex: 'sortNo'
  },
  {
    title: '审核状态',// 1 通过 2 拒绝',
    align:"center",
    dataIndex: 'applyStatus_dictText'
  },
   {
    title: '申报类型',// 1 通过 2 拒绝',
    align:"center",
    dataIndex: 'costType_dictText'
   },
   {
    title: '审核备注',
    align:"center",
    dataIndex: 'applyContent'
   },
   {
    title: '送审次数',
    align:"center",
    dataIndex: 'applyTimes'
   },
   {
    title: '审核时间',
    align:"center",
    dataIndex: 'applyTime'
   },
   {
    title: '审核人',
    align:"center",
    dataIndex: 'applyUserId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'projectName',
    component: 'JInput',
    colProps: { span: 4 },
  },
  {
    label: '项目序号',
    field: 'sortNo',
    component: 'JInput',
    colProps: { span: 4 },
  },
  {
    field: 'customId',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'monster_custom,name,id'
    },
    label: '所属客户',
    colProps: { span: 4 },
  },
  {
    label: '审核状态',
    field: 'applyStatus',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'applyStatus',
      stringToNumber: true,
    },
    colProps: { span: 4 },
  },

  {
    label: '申报类型',
    field: 'costType',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'costType',
      stringToNumber: true,
    },
    colProps: { span: 4 },
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '客户名称',
    field: 'submitId',
    component: 'Input',
  },
  {
    label: '审核状态',// 1 通过 2 拒绝',
    field: 'applyStatus_dictText',
    component: 'InputNumber',
  },
  {
    label: '审核备注',
    field: 'applyContent',
    component: 'Input',
  },
  {
    label: '送审次数',
    field: 'applyTimes',
    component: 'InputNumber',
  },
  {
    label: '审核时间',
    field: 'applyTime',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '审核人',
    field: 'applyUserId_dictText',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
